#include<stdio.h>
int main()
{
	int a,n;
	int t=1,sum=0;
	scanf("%d%d",&a,&n);
	while(t<=n)
	{
		sum=a+sum;
		a=a*10+2;
		++t;
	}
	printf("%d",sum);
	return 0;
}

